/*******************************************************************************
 * Copyright (c) 2023 Eurotech and/or its affiliates and others
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     Eurotech - initial API and implementation
 *******************************************************************************/

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: kurapayload.proto

package org.eclipse.kapua.client.gateway.kura.proto;

public final class KuraPayloadProto {
  private KuraPayloadProto() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface KuraPayloadOrBuilder extends
      // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload)
      com.google.protobuf.GeneratedMessageV3.
          ExtendableMessageOrBuilder<KuraPayload> {

    /**
     * <code>optional int64 timestamp = 1;</code>
     * @return Whether the timestamp field is set.
     */
    boolean hasTimestamp();
    /**
     * <code>optional int64 timestamp = 1;</code>
     * @return The timestamp.
     */
    long getTimestamp();

    /**
     * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
     * @return Whether the position field is set.
     */
    boolean hasPosition();
    /**
     * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
     * @return The position.
     */
    KuraPayloadProto.KuraPayload.KuraPosition getPosition();
    /**
     * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
     */
    KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder();

    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    java.util.List<KuraPayloadProto.KuraPayload.KuraMetric>
        getMetricList();
    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index);
    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    int getMetricCount();
    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    java.util.List<? extends KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
        getMetricOrBuilderList();
    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
        int index);

    /**
     * <code>optional bytes body = 5001;</code>
     * @return Whether the body field is set.
     */
    boolean hasBody();
    /**
     * <code>optional bytes body = 5001;</code>
     * @return The body.
     */
    com.google.protobuf.ByteString getBody();
  }
  /**
   * Protobuf type {@code kuradatatypes.KuraPayload}
   */
  public static final class KuraPayload extends
      com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
        KuraPayload> implements
      // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload)
      KuraPayloadOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use KuraPayload.newBuilder() to construct.
    private KuraPayload(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<KuraPayloadProto.KuraPayload, ?> builder) {
      super(builder);
    }
    private KuraPayload() {
      metric_ = java.util.Collections.emptyList();
      body_ = com.google.protobuf.ByteString.EMPTY;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new KuraPayload();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              KuraPayloadProto.KuraPayload.class, KuraPayloadProto.KuraPayload.Builder.class);
    }

    public interface KuraMetricOrBuilder extends
        // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload.KuraMetric)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <code>required string name = 1;</code>
       * @return Whether the name field is set.
       */
      boolean hasName();
      /**
       * <code>required string name = 1;</code>
       * @return The name.
       */
      java.lang.String getName();
      /**
       * <code>required string name = 1;</code>
       * @return The bytes for name.
       */
      com.google.protobuf.ByteString
          getNameBytes();

      /**
       * <code>required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;</code>
       * @return Whether the type field is set.
       */
      boolean hasType();
      /**
       * <code>required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;</code>
       * @return The type.
       */
      KuraPayloadProto.KuraPayload.KuraMetric.ValueType getType();

      /**
       * <code>optional double double_value = 3;</code>
       * @return Whether the doubleValue field is set.
       */
      boolean hasDoubleValue();
      /**
       * <code>optional double double_value = 3;</code>
       * @return The doubleValue.
       */
      double getDoubleValue();

      /**
       * <code>optional float float_value = 4;</code>
       * @return Whether the floatValue field is set.
       */
      boolean hasFloatValue();
      /**
       * <code>optional float float_value = 4;</code>
       * @return The floatValue.
       */
      float getFloatValue();

      /**
       * <code>optional int64 long_value = 5;</code>
       * @return Whether the longValue field is set.
       */
      boolean hasLongValue();
      /**
       * <code>optional int64 long_value = 5;</code>
       * @return The longValue.
       */
      long getLongValue();

      /**
       * <code>optional int32 int_value = 6;</code>
       * @return Whether the intValue field is set.
       */
      boolean hasIntValue();
      /**
       * <code>optional int32 int_value = 6;</code>
       * @return The intValue.
       */
      int getIntValue();

      /**
       * <code>optional bool bool_value = 7;</code>
       * @return Whether the boolValue field is set.
       */
      boolean hasBoolValue();
      /**
       * <code>optional bool bool_value = 7;</code>
       * @return The boolValue.
       */
      boolean getBoolValue();

      /**
       * <code>optional string string_value = 8;</code>
       * @return Whether the stringValue field is set.
       */
      boolean hasStringValue();
      /**
       * <code>optional string string_value = 8;</code>
       * @return The stringValue.
       */
      java.lang.String getStringValue();
      /**
       * <code>optional string string_value = 8;</code>
       * @return The bytes for stringValue.
       */
      com.google.protobuf.ByteString
          getStringValueBytes();

      /**
       * <code>optional bytes bytes_value = 9;</code>
       * @return Whether the bytesValue field is set.
       */
      boolean hasBytesValue();
      /**
       * <code>optional bytes bytes_value = 9;</code>
       * @return The bytesValue.
       */
      com.google.protobuf.ByteString getBytesValue();
    }
    /**
     * Protobuf type {@code kuradatatypes.KuraPayload.KuraMetric}
     */
    public static final class KuraMetric extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload.KuraMetric)
        KuraMetricOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use KuraMetric.newBuilder() to construct.
      private KuraMetric(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private KuraMetric() {
        name_ = "";
        type_ = 0;
        stringValue_ = "";
        bytesValue_ = com.google.protobuf.ByteString.EMPTY;
      }

      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(
          UnusedPrivateParameter unused) {
        return new KuraMetric();
      }

      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                KuraPayloadProto.KuraPayload.KuraMetric.class, KuraPayloadProto.KuraPayload.KuraMetric.Builder.class);
      }

      /**
       * Protobuf enum {@code kuradatatypes.KuraPayload.KuraMetric.ValueType}
       */
      public enum ValueType
          implements com.google.protobuf.ProtocolMessageEnum {
        /**
         * <code>DOUBLE = 0;</code>
         */
        DOUBLE(0),
        /**
         * <code>FLOAT = 1;</code>
         */
        FLOAT(1),
        /**
         * <code>INT64 = 2;</code>
         */
        INT64(2),
        /**
         * <code>INT32 = 3;</code>
         */
        INT32(3),
        /**
         * <code>BOOL = 4;</code>
         */
        BOOL(4),
        /**
         * <code>STRING = 5;</code>
         */
        STRING(5),
        /**
         * <code>BYTES = 6;</code>
         */
        BYTES(6),
        ;

        /**
         * <code>DOUBLE = 0;</code>
         */
        public static final int DOUBLE_VALUE = 0;
        /**
         * <code>FLOAT = 1;</code>
         */
        public static final int FLOAT_VALUE = 1;
        /**
         * <code>INT64 = 2;</code>
         */
        public static final int INT64_VALUE = 2;
        /**
         * <code>INT32 = 3;</code>
         */
        public static final int INT32_VALUE = 3;
        /**
         * <code>BOOL = 4;</code>
         */
        public static final int BOOL_VALUE = 4;
        /**
         * <code>STRING = 5;</code>
         */
        public static final int STRING_VALUE = 5;
        /**
         * <code>BYTES = 6;</code>
         */
        public static final int BYTES_VALUE = 6;


        public final int getNumber() {
          return value;
        }

        /**
         * @param value The numeric wire value of the corresponding enum entry.
         * @return The enum associated with the given numeric wire value.
         * @deprecated Use {@link #forNumber(int)} instead.
         */
        @java.lang.Deprecated
        public static ValueType valueOf(int value) {
          return forNumber(value);
        }

        /**
         * @param value The numeric wire value of the corresponding enum entry.
         * @return The enum associated with the given numeric wire value.
         */
        public static ValueType forNumber(int value) {
          switch (value) {
            case 0: return DOUBLE;
            case 1: return FLOAT;
            case 2: return INT64;
            case 3: return INT32;
            case 4: return BOOL;
            case 5: return STRING;
            case 6: return BYTES;
            default: return null;
          }
        }

        public static com.google.protobuf.Internal.EnumLiteMap<ValueType>
            internalGetValueMap() {
          return internalValueMap;
        }
        private static final com.google.protobuf.Internal.EnumLiteMap<
            ValueType> internalValueMap =
              new com.google.protobuf.Internal.EnumLiteMap<ValueType>() {
                public ValueType findValueByNumber(int number) {
                  return ValueType.forNumber(number);
                }
              };

        public final com.google.protobuf.Descriptors.EnumValueDescriptor
            getValueDescriptor() {
          return getDescriptor().getValues().get(ordinal());
        }
        public final com.google.protobuf.Descriptors.EnumDescriptor
            getDescriptorForType() {
          return getDescriptor();
        }
        public static final com.google.protobuf.Descriptors.EnumDescriptor
            getDescriptor() {
          return KuraPayloadProto.KuraPayload.KuraMetric.getDescriptor().getEnumTypes().get(0);
        }

        private static final ValueType[] VALUES = values();

        public static ValueType valueOf(
            com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
          if (desc.getType() != getDescriptor()) {
            throw new java.lang.IllegalArgumentException(
              "EnumValueDescriptor is not for this type.");
          }
          return VALUES[desc.getIndex()];
        }

        private final int value;

        private ValueType(int value) {
          this.value = value;
        }

        // @@protoc_insertion_point(enum_scope:kuradatatypes.KuraPayload.KuraMetric.ValueType)
      }

      private int bitField0_;
      public static final int NAME_FIELD_NUMBER = 1;
      private volatile java.lang.Object name_;
      /**
       * <code>required string name = 1;</code>
       * @return Whether the name field is set.
       */
      @java.lang.Override
      public boolean hasName() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>required string name = 1;</code>
       * @return The name.
       */
      @java.lang.Override
      public java.lang.String getName() {
        java.lang.Object ref = name_;
        if (ref instanceof java.lang.String) {
          return (java.lang.String) ref;
        } else {
          com.google.protobuf.ByteString bs = 
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          if (bs.isValidUtf8()) {
            name_ = s;
          }
          return s;
        }
      }
      /**
       * <code>required string name = 1;</code>
       * @return The bytes for name.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString
          getNameBytes() {
        java.lang.Object ref = name_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          name_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      public static final int TYPE_FIELD_NUMBER = 2;
      private int type_;
      /**
       * <code>required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;</code>
       * @return Whether the type field is set.
       */
      @java.lang.Override public boolean hasType() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <code>required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;</code>
       * @return The type.
       */
      @java.lang.Override public KuraPayloadProto.KuraPayload.KuraMetric.ValueType getType() {
        @SuppressWarnings("deprecation")
        KuraPayloadProto.KuraPayload.KuraMetric.ValueType result = KuraPayloadProto.KuraPayload.KuraMetric.ValueType.valueOf(type_);
        return result == null ? KuraPayloadProto.KuraPayload.KuraMetric.ValueType.DOUBLE : result;
      }

      public static final int DOUBLE_VALUE_FIELD_NUMBER = 3;
      private double doubleValue_;
      /**
       * <code>optional double double_value = 3;</code>
       * @return Whether the doubleValue field is set.
       */
      @java.lang.Override
      public boolean hasDoubleValue() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <code>optional double double_value = 3;</code>
       * @return The doubleValue.
       */
      @java.lang.Override
      public double getDoubleValue() {
        return doubleValue_;
      }

      public static final int FLOAT_VALUE_FIELD_NUMBER = 4;
      private float floatValue_;
      /**
       * <code>optional float float_value = 4;</code>
       * @return Whether the floatValue field is set.
       */
      @java.lang.Override
      public boolean hasFloatValue() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <code>optional float float_value = 4;</code>
       * @return The floatValue.
       */
      @java.lang.Override
      public float getFloatValue() {
        return floatValue_;
      }

      public static final int LONG_VALUE_FIELD_NUMBER = 5;
      private long longValue_;
      /**
       * <code>optional int64 long_value = 5;</code>
       * @return Whether the longValue field is set.
       */
      @java.lang.Override
      public boolean hasLongValue() {
        return ((bitField0_ & 0x00000010) != 0);
      }
      /**
       * <code>optional int64 long_value = 5;</code>
       * @return The longValue.
       */
      @java.lang.Override
      public long getLongValue() {
        return longValue_;
      }

      public static final int INT_VALUE_FIELD_NUMBER = 6;
      private int intValue_;
      /**
       * <code>optional int32 int_value = 6;</code>
       * @return Whether the intValue field is set.
       */
      @java.lang.Override
      public boolean hasIntValue() {
        return ((bitField0_ & 0x00000020) != 0);
      }
      /**
       * <code>optional int32 int_value = 6;</code>
       * @return The intValue.
       */
      @java.lang.Override
      public int getIntValue() {
        return intValue_;
      }

      public static final int BOOL_VALUE_FIELD_NUMBER = 7;
      private boolean boolValue_;
      /**
       * <code>optional bool bool_value = 7;</code>
       * @return Whether the boolValue field is set.
       */
      @java.lang.Override
      public boolean hasBoolValue() {
        return ((bitField0_ & 0x00000040) != 0);
      }
      /**
       * <code>optional bool bool_value = 7;</code>
       * @return The boolValue.
       */
      @java.lang.Override
      public boolean getBoolValue() {
        return boolValue_;
      }

      public static final int STRING_VALUE_FIELD_NUMBER = 8;
      private volatile java.lang.Object stringValue_;
      /**
       * <code>optional string string_value = 8;</code>
       * @return Whether the stringValue field is set.
       */
      @java.lang.Override
      public boolean hasStringValue() {
        return ((bitField0_ & 0x00000080) != 0);
      }
      /**
       * <code>optional string string_value = 8;</code>
       * @return The stringValue.
       */
      @java.lang.Override
      public java.lang.String getStringValue() {
        java.lang.Object ref = stringValue_;
        if (ref instanceof java.lang.String) {
          return (java.lang.String) ref;
        } else {
          com.google.protobuf.ByteString bs = 
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          if (bs.isValidUtf8()) {
            stringValue_ = s;
          }
          return s;
        }
      }
      /**
       * <code>optional string string_value = 8;</code>
       * @return The bytes for stringValue.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString
          getStringValueBytes() {
        java.lang.Object ref = stringValue_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          stringValue_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      public static final int BYTES_VALUE_FIELD_NUMBER = 9;
      private com.google.protobuf.ByteString bytesValue_;
      /**
       * <code>optional bytes bytes_value = 9;</code>
       * @return Whether the bytesValue field is set.
       */
      @java.lang.Override
      public boolean hasBytesValue() {
        return ((bitField0_ & 0x00000100) != 0);
      }
      /**
       * <code>optional bytes bytes_value = 9;</code>
       * @return The bytesValue.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getBytesValue() {
        return bytesValue_;
      }

      private byte memoizedIsInitialized = -1;
      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        if (!hasName()) {
          memoizedIsInitialized = 0;
          return false;
        }
        if (!hasType()) {
          memoizedIsInitialized = 0;
          return false;
        }
        memoizedIsInitialized = 1;
        return true;
      }

      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (((bitField0_ & 0x00000001) != 0)) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          output.writeEnum(2, type_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          output.writeDouble(3, doubleValue_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          output.writeFloat(4, floatValue_);
        }
        if (((bitField0_ & 0x00000010) != 0)) {
          output.writeInt64(5, longValue_);
        }
        if (((bitField0_ & 0x00000020) != 0)) {
          output.writeInt32(6, intValue_);
        }
        if (((bitField0_ & 0x00000040) != 0)) {
          output.writeBool(7, boolValue_);
        }
        if (((bitField0_ & 0x00000080) != 0)) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 8, stringValue_);
        }
        if (((bitField0_ & 0x00000100) != 0)) {
          output.writeBytes(9, bytesValue_);
        }
        getUnknownFields().writeTo(output);
      }

      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (((bitField0_ & 0x00000001) != 0)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeEnumSize(2, type_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeDoubleSize(3, doubleValue_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeFloatSize(4, floatValue_);
        }
        if (((bitField0_ & 0x00000010) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt64Size(5, longValue_);
        }
        if (((bitField0_ & 0x00000020) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt32Size(6, intValue_);
        }
        if (((bitField0_ & 0x00000040) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBoolSize(7, boolValue_);
        }
        if (((bitField0_ & 0x00000080) != 0)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, stringValue_);
        }
        if (((bitField0_ & 0x00000100) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(9, bytesValue_);
        }
        size += getUnknownFields().getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof KuraPayloadProto.KuraPayload.KuraMetric)) {
          return super.equals(obj);
        }
        KuraPayloadProto.KuraPayload.KuraMetric other = (KuraPayloadProto.KuraPayload.KuraMetric) obj;

        if (hasName() != other.hasName()) return false;
        if (hasName()) {
          if (!getName()
              .equals(other.getName())) return false;
        }
        if (hasType() != other.hasType()) return false;
        if (hasType()) {
          if (type_ != other.type_) return false;
        }
        if (hasDoubleValue() != other.hasDoubleValue()) return false;
        if (hasDoubleValue()) {
          if (java.lang.Double.doubleToLongBits(getDoubleValue())
              != java.lang.Double.doubleToLongBits(
                  other.getDoubleValue())) return false;
        }
        if (hasFloatValue() != other.hasFloatValue()) return false;
        if (hasFloatValue()) {
          if (java.lang.Float.floatToIntBits(getFloatValue())
              != java.lang.Float.floatToIntBits(
                  other.getFloatValue())) return false;
        }
        if (hasLongValue() != other.hasLongValue()) return false;
        if (hasLongValue()) {
          if (getLongValue()
              != other.getLongValue()) return false;
        }
        if (hasIntValue() != other.hasIntValue()) return false;
        if (hasIntValue()) {
          if (getIntValue()
              != other.getIntValue()) return false;
        }
        if (hasBoolValue() != other.hasBoolValue()) return false;
        if (hasBoolValue()) {
          if (getBoolValue()
              != other.getBoolValue()) return false;
        }
        if (hasStringValue() != other.hasStringValue()) return false;
        if (hasStringValue()) {
          if (!getStringValue()
              .equals(other.getStringValue())) return false;
        }
        if (hasBytesValue() != other.hasBytesValue()) return false;
        if (hasBytesValue()) {
          if (!getBytesValue()
              .equals(other.getBytesValue())) return false;
        }
        if (!getUnknownFields().equals(other.getUnknownFields())) return false;
        return true;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasName()) {
          hash = (37 * hash) + NAME_FIELD_NUMBER;
          hash = (53 * hash) + getName().hashCode();
        }
        if (hasType()) {
          hash = (37 * hash) + TYPE_FIELD_NUMBER;
          hash = (53 * hash) + type_;
        }
        if (hasDoubleValue()) {
          hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
              java.lang.Double.doubleToLongBits(getDoubleValue()));
        }
        if (hasFloatValue()) {
          hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER;
          hash = (53 * hash) + java.lang.Float.floatToIntBits(
              getFloatValue());
        }
        if (hasLongValue()) {
          hash = (37 * hash) + LONG_VALUE_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
              getLongValue());
        }
        if (hasIntValue()) {
          hash = (37 * hash) + INT_VALUE_FIELD_NUMBER;
          hash = (53 * hash) + getIntValue();
        }
        if (hasBoolValue()) {
          hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
              getBoolValue());
        }
        if (hasStringValue()) {
          hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
          hash = (53 * hash) + getStringValue().hashCode();
        }
        if (hasBytesValue()) {
          hash = (37 * hash) + BYTES_VALUE_FIELD_NUMBER;
          hash = (53 * hash) + getBytesValue().hashCode();
        }
        hash = (29 * hash) + getUnknownFields().hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static KuraPayloadProto.KuraPayload.KuraMetric parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }

      @java.lang.Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(KuraPayloadProto.KuraPayload.KuraMetric prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }

      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code kuradatatypes.KuraPayload.KuraMetric}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload.KuraMetric)
          KuraPayloadProto.KuraPayload.KuraMetricOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  KuraPayloadProto.KuraPayload.KuraMetric.class, KuraPayloadProto.KuraPayload.KuraMetric.Builder.class);
        }

        // Construct using org.eclipse.kapua.client.gateway.kura.proto.KuraPayloadProto.KuraPayload.KuraMetric.newBuilder()
        private Builder() {

        }

        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);

        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          name_ = "";
          bitField0_ = (bitField0_ & ~0x00000001);
          type_ = 0;
          bitField0_ = (bitField0_ & ~0x00000002);
          doubleValue_ = 0D;
          bitField0_ = (bitField0_ & ~0x00000004);
          floatValue_ = 0F;
          bitField0_ = (bitField0_ & ~0x00000008);
          longValue_ = 0L;
          bitField0_ = (bitField0_ & ~0x00000010);
          intValue_ = 0;
          bitField0_ = (bitField0_ & ~0x00000020);
          boolValue_ = false;
          bitField0_ = (bitField0_ & ~0x00000040);
          stringValue_ = "";
          bitField0_ = (bitField0_ & ~0x00000080);
          bytesValue_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000100);
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
        }

        @java.lang.Override
        public KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstanceForType() {
          return KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance();
        }

        @java.lang.Override
        public KuraPayloadProto.KuraPayload.KuraMetric build() {
          KuraPayloadProto.KuraPayload.KuraMetric result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public KuraPayloadProto.KuraPayload.KuraMetric buildPartial() {
          KuraPayloadProto.KuraPayload.KuraMetric result = new KuraPayloadProto.KuraPayload.KuraMetric(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            to_bitField0_ |= 0x00000001;
          }
          result.name_ = name_;
          if (((from_bitField0_ & 0x00000002) != 0)) {
            to_bitField0_ |= 0x00000002;
          }
          result.type_ = type_;
          if (((from_bitField0_ & 0x00000004) != 0)) {
            result.doubleValue_ = doubleValue_;
            to_bitField0_ |= 0x00000004;
          }
          if (((from_bitField0_ & 0x00000008) != 0)) {
            result.floatValue_ = floatValue_;
            to_bitField0_ |= 0x00000008;
          }
          if (((from_bitField0_ & 0x00000010) != 0)) {
            result.longValue_ = longValue_;
            to_bitField0_ |= 0x00000010;
          }
          if (((from_bitField0_ & 0x00000020) != 0)) {
            result.intValue_ = intValue_;
            to_bitField0_ |= 0x00000020;
          }
          if (((from_bitField0_ & 0x00000040) != 0)) {
            result.boolValue_ = boolValue_;
            to_bitField0_ |= 0x00000040;
          }
          if (((from_bitField0_ & 0x00000080) != 0)) {
            to_bitField0_ |= 0x00000080;
          }
          result.stringValue_ = stringValue_;
          if (((from_bitField0_ & 0x00000100) != 0)) {
            to_bitField0_ |= 0x00000100;
          }
          result.bytesValue_ = bytesValue_;
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }

        @java.lang.Override
        public Builder clone() {
          return super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof KuraPayloadProto.KuraPayload.KuraMetric) {
            return mergeFrom((KuraPayloadProto.KuraPayload.KuraMetric)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(KuraPayloadProto.KuraPayload.KuraMetric other) {
          if (other == KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance()) return this;
          if (other.hasName()) {
            bitField0_ |= 0x00000001;
            name_ = other.name_;
            onChanged();
          }
          if (other.hasType()) {
            setType(other.getType());
          }
          if (other.hasDoubleValue()) {
            setDoubleValue(other.getDoubleValue());
          }
          if (other.hasFloatValue()) {
            setFloatValue(other.getFloatValue());
          }
          if (other.hasLongValue()) {
            setLongValue(other.getLongValue());
          }
          if (other.hasIntValue()) {
            setIntValue(other.getIntValue());
          }
          if (other.hasBoolValue()) {
            setBoolValue(other.getBoolValue());
          }
          if (other.hasStringValue()) {
            bitField0_ |= 0x00000080;
            stringValue_ = other.stringValue_;
            onChanged();
          }
          if (other.hasBytesValue()) {
            setBytesValue(other.getBytesValue());
          }
          this.mergeUnknownFields(other.getUnknownFields());
          onChanged();
          return this;
        }

        @java.lang.Override
        public final boolean isInitialized() {
          if (!hasName()) {
            return false;
          }
          if (!hasType()) {
            return false;
          }
          return true;
        }

        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          if (extensionRegistry == null) {
            throw new java.lang.NullPointerException();
          }
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                case 10: {
                  name_ = input.readBytes();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
                case 16: {
                  int tmpRaw = input.readEnum();
                  KuraPayloadProto.KuraPayload.KuraMetric.ValueType tmpValue =
                      KuraPayloadProto.KuraPayload.KuraMetric.ValueType.forNumber(tmpRaw);
                  if (tmpValue == null) {
                    mergeUnknownVarintField(2, tmpRaw);
                  } else {
                    type_ = tmpRaw;
                    bitField0_ |= 0x00000002;
                  }
                  break;
                } // case 16
                case 25: {
                  doubleValue_ = input.readDouble();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 25
                case 37: {
                  floatValue_ = input.readFloat();
                  bitField0_ |= 0x00000008;
                  break;
                } // case 37
                case 40: {
                  longValue_ = input.readInt64();
                  bitField0_ |= 0x00000010;
                  break;
                } // case 40
                case 48: {
                  intValue_ = input.readInt32();
                  bitField0_ |= 0x00000020;
                  break;
                } // case 48
                case 56: {
                  boolValue_ = input.readBool();
                  bitField0_ |= 0x00000040;
                  break;
                } // case 56
                case 66: {
                  stringValue_ = input.readBytes();
                  bitField0_ |= 0x00000080;
                  break;
                } // case 66
                case 74: {
                  bytesValue_ = input.readBytes();
                  bitField0_ |= 0x00000100;
                  break;
                } // case 74
                default: {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
              } // switch (tag)
            } // while (!done)
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.unwrapIOException();
          } finally {
            onChanged();
          } // finally
          return this;
        }
        private int bitField0_;

        private java.lang.Object name_ = "";
        /**
         * <code>required string name = 1;</code>
         * @return Whether the name field is set.
         */
        public boolean hasName() {
          return ((bitField0_ & 0x00000001) != 0);
        }
        /**
         * <code>required string name = 1;</code>
         * @return The name.
         */
        public java.lang.String getName() {
          java.lang.Object ref = name_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs =
                (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            if (bs.isValidUtf8()) {
              name_ = s;
            }
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         * <code>required string name = 1;</code>
         * @return The bytes for name.
         */
        public com.google.protobuf.ByteString
            getNameBytes() {
          java.lang.Object ref = name_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b = 
                com.google.protobuf.ByteString.copyFromUtf8(
                    (java.lang.String) ref);
            name_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         * <code>required string name = 1;</code>
         * @param value The name to set.
         * @return This builder for chaining.
         */
        public Builder setName(
            java.lang.String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
          name_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>required string name = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearName() {
          bitField0_ = (bitField0_ & ~0x00000001);
          name_ = getDefaultInstance().getName();
          onChanged();
          return this;
        }
        /**
         * <code>required string name = 1;</code>
         * @param value The bytes for name to set.
         * @return This builder for chaining.
         */
        public Builder setNameBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
          name_ = value;
          onChanged();
          return this;
        }

        private int type_ = 0;
        /**
         * <code>required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;</code>
         * @return Whether the type field is set.
         */
        @java.lang.Override public boolean hasType() {
          return ((bitField0_ & 0x00000002) != 0);
        }
        /**
         * <code>required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;</code>
         * @return The type.
         */
        @java.lang.Override
        public KuraPayloadProto.KuraPayload.KuraMetric.ValueType getType() {
          @SuppressWarnings("deprecation")
          KuraPayloadProto.KuraPayload.KuraMetric.ValueType result = KuraPayloadProto.KuraPayload.KuraMetric.ValueType.valueOf(type_);
          return result == null ? KuraPayloadProto.KuraPayload.KuraMetric.ValueType.DOUBLE : result;
        }
        /**
         * <code>required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;</code>
         * @param value The type to set.
         * @return This builder for chaining.
         */
        public Builder setType(KuraPayloadProto.KuraPayload.KuraMetric.ValueType value) {
          if (value == null) {
            throw new NullPointerException();
          }
          bitField0_ |= 0x00000002;
          type_ = value.getNumber();
          onChanged();
          return this;
        }
        /**
         * <code>required .kuradatatypes.KuraPayload.KuraMetric.ValueType type = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearType() {
          bitField0_ = (bitField0_ & ~0x00000002);
          type_ = 0;
          onChanged();
          return this;
        }

        private double doubleValue_ ;
        /**
         * <code>optional double double_value = 3;</code>
         * @return Whether the doubleValue field is set.
         */
        @java.lang.Override
        public boolean hasDoubleValue() {
          return ((bitField0_ & 0x00000004) != 0);
        }
        /**
         * <code>optional double double_value = 3;</code>
         * @return The doubleValue.
         */
        @java.lang.Override
        public double getDoubleValue() {
          return doubleValue_;
        }
        /**
         * <code>optional double double_value = 3;</code>
         * @param value The doubleValue to set.
         * @return This builder for chaining.
         */
        public Builder setDoubleValue(double value) {
          bitField0_ |= 0x00000004;
          doubleValue_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional double double_value = 3;</code>
         * @return This builder for chaining.
         */
        public Builder clearDoubleValue() {
          bitField0_ = (bitField0_ & ~0x00000004);
          doubleValue_ = 0D;
          onChanged();
          return this;
        }

        private float floatValue_ ;
        /**
         * <code>optional float float_value = 4;</code>
         * @return Whether the floatValue field is set.
         */
        @java.lang.Override
        public boolean hasFloatValue() {
          return ((bitField0_ & 0x00000008) != 0);
        }
        /**
         * <code>optional float float_value = 4;</code>
         * @return The floatValue.
         */
        @java.lang.Override
        public float getFloatValue() {
          return floatValue_;
        }
        /**
         * <code>optional float float_value = 4;</code>
         * @param value The floatValue to set.
         * @return This builder for chaining.
         */
        public Builder setFloatValue(float value) {
          bitField0_ |= 0x00000008;
          floatValue_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional float float_value = 4;</code>
         * @return This builder for chaining.
         */
        public Builder clearFloatValue() {
          bitField0_ = (bitField0_ & ~0x00000008);
          floatValue_ = 0F;
          onChanged();
          return this;
        }

        private long longValue_ ;
        /**
         * <code>optional int64 long_value = 5;</code>
         * @return Whether the longValue field is set.
         */
        @java.lang.Override
        public boolean hasLongValue() {
          return ((bitField0_ & 0x00000010) != 0);
        }
        /**
         * <code>optional int64 long_value = 5;</code>
         * @return The longValue.
         */
        @java.lang.Override
        public long getLongValue() {
          return longValue_;
        }
        /**
         * <code>optional int64 long_value = 5;</code>
         * @param value The longValue to set.
         * @return This builder for chaining.
         */
        public Builder setLongValue(long value) {
          bitField0_ |= 0x00000010;
          longValue_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional int64 long_value = 5;</code>
         * @return This builder for chaining.
         */
        public Builder clearLongValue() {
          bitField0_ = (bitField0_ & ~0x00000010);
          longValue_ = 0L;
          onChanged();
          return this;
        }

        private int intValue_ ;
        /**
         * <code>optional int32 int_value = 6;</code>
         * @return Whether the intValue field is set.
         */
        @java.lang.Override
        public boolean hasIntValue() {
          return ((bitField0_ & 0x00000020) != 0);
        }
        /**
         * <code>optional int32 int_value = 6;</code>
         * @return The intValue.
         */
        @java.lang.Override
        public int getIntValue() {
          return intValue_;
        }
        /**
         * <code>optional int32 int_value = 6;</code>
         * @param value The intValue to set.
         * @return This builder for chaining.
         */
        public Builder setIntValue(int value) {
          bitField0_ |= 0x00000020;
          intValue_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional int32 int_value = 6;</code>
         * @return This builder for chaining.
         */
        public Builder clearIntValue() {
          bitField0_ = (bitField0_ & ~0x00000020);
          intValue_ = 0;
          onChanged();
          return this;
        }

        private boolean boolValue_ ;
        /**
         * <code>optional bool bool_value = 7;</code>
         * @return Whether the boolValue field is set.
         */
        @java.lang.Override
        public boolean hasBoolValue() {
          return ((bitField0_ & 0x00000040) != 0);
        }
        /**
         * <code>optional bool bool_value = 7;</code>
         * @return The boolValue.
         */
        @java.lang.Override
        public boolean getBoolValue() {
          return boolValue_;
        }
        /**
         * <code>optional bool bool_value = 7;</code>
         * @param value The boolValue to set.
         * @return This builder for chaining.
         */
        public Builder setBoolValue(boolean value) {
          bitField0_ |= 0x00000040;
          boolValue_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bool bool_value = 7;</code>
         * @return This builder for chaining.
         */
        public Builder clearBoolValue() {
          bitField0_ = (bitField0_ & ~0x00000040);
          boolValue_ = false;
          onChanged();
          return this;
        }

        private java.lang.Object stringValue_ = "";
        /**
         * <code>optional string string_value = 8;</code>
         * @return Whether the stringValue field is set.
         */
        public boolean hasStringValue() {
          return ((bitField0_ & 0x00000080) != 0);
        }
        /**
         * <code>optional string string_value = 8;</code>
         * @return The stringValue.
         */
        public java.lang.String getStringValue() {
          java.lang.Object ref = stringValue_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs =
                (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            if (bs.isValidUtf8()) {
              stringValue_ = s;
            }
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         * <code>optional string string_value = 8;</code>
         * @return The bytes for stringValue.
         */
        public com.google.protobuf.ByteString
            getStringValueBytes() {
          java.lang.Object ref = stringValue_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b = 
                com.google.protobuf.ByteString.copyFromUtf8(
                    (java.lang.String) ref);
            stringValue_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         * <code>optional string string_value = 8;</code>
         * @param value The stringValue to set.
         * @return This builder for chaining.
         */
        public Builder setStringValue(
            java.lang.String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000080;
          stringValue_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional string string_value = 8;</code>
         * @return This builder for chaining.
         */
        public Builder clearStringValue() {
          bitField0_ = (bitField0_ & ~0x00000080);
          stringValue_ = getDefaultInstance().getStringValue();
          onChanged();
          return this;
        }
        /**
         * <code>optional string string_value = 8;</code>
         * @param value The bytes for stringValue to set.
         * @return This builder for chaining.
         */
        public Builder setStringValueBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000080;
          stringValue_ = value;
          onChanged();
          return this;
        }

        private com.google.protobuf.ByteString bytesValue_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes bytes_value = 9;</code>
         * @return Whether the bytesValue field is set.
         */
        @java.lang.Override
        public boolean hasBytesValue() {
          return ((bitField0_ & 0x00000100) != 0);
        }
        /**
         * <code>optional bytes bytes_value = 9;</code>
         * @return The bytesValue.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getBytesValue() {
          return bytesValue_;
        }
        /**
         * <code>optional bytes bytes_value = 9;</code>
         * @param value The bytesValue to set.
         * @return This builder for chaining.
         */
        public Builder setBytesValue(com.google.protobuf.ByteString value) {
          if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000100;
          bytesValue_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes bytes_value = 9;</code>
         * @return This builder for chaining.
         */
        public Builder clearBytesValue() {
          bitField0_ = (bitField0_ & ~0x00000100);
          bytesValue_ = getDefaultInstance().getBytesValue();
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }

        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }


        // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload.KuraMetric)
      }

      // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload.KuraMetric)
      private static final KuraPayloadProto.KuraPayload.KuraMetric DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new KuraPayloadProto.KuraPayload.KuraMetric();
      }

      public static KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      @java.lang.Deprecated public static final com.google.protobuf.Parser<KuraMetric>
          PARSER = new com.google.protobuf.AbstractParser<KuraMetric>() {
        @java.lang.Override
        public KuraMetric parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

      public static com.google.protobuf.Parser<KuraMetric> parser() {
        return PARSER;
      }

      @java.lang.Override
      public com.google.protobuf.Parser<KuraMetric> getParserForType() {
        return PARSER;
      }

      @java.lang.Override
      public KuraPayloadProto.KuraPayload.KuraMetric getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }

    }

    public interface KuraPositionOrBuilder extends
        // @@protoc_insertion_point(interface_extends:kuradatatypes.KuraPayload.KuraPosition)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <code>required double latitude = 1;</code>
       * @return Whether the latitude field is set.
       */
      boolean hasLatitude();
      /**
       * <code>required double latitude = 1;</code>
       * @return The latitude.
       */
      double getLatitude();

      /**
       * <code>required double longitude = 2;</code>
       * @return Whether the longitude field is set.
       */
      boolean hasLongitude();
      /**
       * <code>required double longitude = 2;</code>
       * @return The longitude.
       */
      double getLongitude();

      /**
       * <code>optional double altitude = 3;</code>
       * @return Whether the altitude field is set.
       */
      boolean hasAltitude();
      /**
       * <code>optional double altitude = 3;</code>
       * @return The altitude.
       */
      double getAltitude();

      /**
       * <pre>
       * dilution of precision of the current satellite fix. 
       * </pre>
       *
       * <code>optional double precision = 4;</code>
       * @return Whether the precision field is set.
       */
      boolean hasPrecision();
      /**
       * <pre>
       * dilution of precision of the current satellite fix. 
       * </pre>
       *
       * <code>optional double precision = 4;</code>
       * @return The precision.
       */
      double getPrecision();

      /**
       * <pre>
       * heading in degrees
       * </pre>
       *
       * <code>optional double heading = 5;</code>
       * @return Whether the heading field is set.
       */
      boolean hasHeading();
      /**
       * <pre>
       * heading in degrees
       * </pre>
       *
       * <code>optional double heading = 5;</code>
       * @return The heading.
       */
      double getHeading();

      /**
       * <pre>
       * meters per second
       * </pre>
       *
       * <code>optional double speed = 6;</code>
       * @return Whether the speed field is set.
       */
      boolean hasSpeed();
      /**
       * <pre>
       * meters per second
       * </pre>
       *
       * <code>optional double speed = 6;</code>
       * @return The speed.
       */
      double getSpeed();

      /**
       * <code>optional int64 timestamp = 7;</code>
       * @return Whether the timestamp field is set.
       */
      boolean hasTimestamp();
      /**
       * <code>optional int64 timestamp = 7;</code>
       * @return The timestamp.
       */
      long getTimestamp();

      /**
       * <pre>
       * number satellites locked by the GPS device
       * </pre>
       *
       * <code>optional int32 satellites = 8;</code>
       * @return Whether the satellites field is set.
       */
      boolean hasSatellites();
      /**
       * <pre>
       * number satellites locked by the GPS device
       * </pre>
       *
       * <code>optional int32 satellites = 8;</code>
       * @return The satellites.
       */
      int getSatellites();

      /**
       * <pre>
       * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
       * </pre>
       *
       * <code>optional int32 status = 9;</code>
       * @return Whether the status field is set.
       */
      boolean hasStatus();
      /**
       * <pre>
       * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
       * </pre>
       *
       * <code>optional int32 status = 9;</code>
       * @return The status.
       */
      int getStatus();
    }
    /**
     * Protobuf type {@code kuradatatypes.KuraPayload.KuraPosition}
     */
    public static final class KuraPosition extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:kuradatatypes.KuraPayload.KuraPosition)
        KuraPositionOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use KuraPosition.newBuilder() to construct.
      private KuraPosition(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private KuraPosition() {
      }

      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(
          UnusedPrivateParameter unused) {
        return new KuraPosition();
      }

      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                KuraPayloadProto.KuraPayload.KuraPosition.class, KuraPayloadProto.KuraPayload.KuraPosition.Builder.class);
      }

      private int bitField0_;
      public static final int LATITUDE_FIELD_NUMBER = 1;
      private double latitude_;
      /**
       * <code>required double latitude = 1;</code>
       * @return Whether the latitude field is set.
       */
      @java.lang.Override
      public boolean hasLatitude() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>required double latitude = 1;</code>
       * @return The latitude.
       */
      @java.lang.Override
      public double getLatitude() {
        return latitude_;
      }

      public static final int LONGITUDE_FIELD_NUMBER = 2;
      private double longitude_;
      /**
       * <code>required double longitude = 2;</code>
       * @return Whether the longitude field is set.
       */
      @java.lang.Override
      public boolean hasLongitude() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <code>required double longitude = 2;</code>
       * @return The longitude.
       */
      @java.lang.Override
      public double getLongitude() {
        return longitude_;
      }

      public static final int ALTITUDE_FIELD_NUMBER = 3;
      private double altitude_;
      /**
       * <code>optional double altitude = 3;</code>
       * @return Whether the altitude field is set.
       */
      @java.lang.Override
      public boolean hasAltitude() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <code>optional double altitude = 3;</code>
       * @return The altitude.
       */
      @java.lang.Override
      public double getAltitude() {
        return altitude_;
      }

      public static final int PRECISION_FIELD_NUMBER = 4;
      private double precision_;
      /**
       * <pre>
       * dilution of precision of the current satellite fix. 
       * </pre>
       *
       * <code>optional double precision = 4;</code>
       * @return Whether the precision field is set.
       */
      @java.lang.Override
      public boolean hasPrecision() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <pre>
       * dilution of precision of the current satellite fix. 
       * </pre>
       *
       * <code>optional double precision = 4;</code>
       * @return The precision.
       */
      @java.lang.Override
      public double getPrecision() {
        return precision_;
      }

      public static final int HEADING_FIELD_NUMBER = 5;
      private double heading_;
      /**
       * <pre>
       * heading in degrees
       * </pre>
       *
       * <code>optional double heading = 5;</code>
       * @return Whether the heading field is set.
       */
      @java.lang.Override
      public boolean hasHeading() {
        return ((bitField0_ & 0x00000010) != 0);
      }
      /**
       * <pre>
       * heading in degrees
       * </pre>
       *
       * <code>optional double heading = 5;</code>
       * @return The heading.
       */
      @java.lang.Override
      public double getHeading() {
        return heading_;
      }

      public static final int SPEED_FIELD_NUMBER = 6;
      private double speed_;
      /**
       * <pre>
       * meters per second
       * </pre>
       *
       * <code>optional double speed = 6;</code>
       * @return Whether the speed field is set.
       */
      @java.lang.Override
      public boolean hasSpeed() {
        return ((bitField0_ & 0x00000020) != 0);
      }
      /**
       * <pre>
       * meters per second
       * </pre>
       *
       * <code>optional double speed = 6;</code>
       * @return The speed.
       */
      @java.lang.Override
      public double getSpeed() {
        return speed_;
      }

      public static final int TIMESTAMP_FIELD_NUMBER = 7;
      private long timestamp_;
      /**
       * <code>optional int64 timestamp = 7;</code>
       * @return Whether the timestamp field is set.
       */
      @java.lang.Override
      public boolean hasTimestamp() {
        return ((bitField0_ & 0x00000040) != 0);
      }
      /**
       * <code>optional int64 timestamp = 7;</code>
       * @return The timestamp.
       */
      @java.lang.Override
      public long getTimestamp() {
        return timestamp_;
      }

      public static final int SATELLITES_FIELD_NUMBER = 8;
      private int satellites_;
      /**
       * <pre>
       * number satellites locked by the GPS device
       * </pre>
       *
       * <code>optional int32 satellites = 8;</code>
       * @return Whether the satellites field is set.
       */
      @java.lang.Override
      public boolean hasSatellites() {
        return ((bitField0_ & 0x00000080) != 0);
      }
      /**
       * <pre>
       * number satellites locked by the GPS device
       * </pre>
       *
       * <code>optional int32 satellites = 8;</code>
       * @return The satellites.
       */
      @java.lang.Override
      public int getSatellites() {
        return satellites_;
      }

      public static final int STATUS_FIELD_NUMBER = 9;
      private int status_;
      /**
       * <pre>
       * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
       * </pre>
       *
       * <code>optional int32 status = 9;</code>
       * @return Whether the status field is set.
       */
      @java.lang.Override
      public boolean hasStatus() {
        return ((bitField0_ & 0x00000100) != 0);
      }
      /**
       * <pre>
       * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
       * </pre>
       *
       * <code>optional int32 status = 9;</code>
       * @return The status.
       */
      @java.lang.Override
      public int getStatus() {
        return status_;
      }

      private byte memoizedIsInitialized = -1;
      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        if (!hasLatitude()) {
          memoizedIsInitialized = 0;
          return false;
        }
        if (!hasLongitude()) {
          memoizedIsInitialized = 0;
          return false;
        }
        memoizedIsInitialized = 1;
        return true;
      }

      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (((bitField0_ & 0x00000001) != 0)) {
          output.writeDouble(1, latitude_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          output.writeDouble(2, longitude_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          output.writeDouble(3, altitude_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          output.writeDouble(4, precision_);
        }
        if (((bitField0_ & 0x00000010) != 0)) {
          output.writeDouble(5, heading_);
        }
        if (((bitField0_ & 0x00000020) != 0)) {
          output.writeDouble(6, speed_);
        }
        if (((bitField0_ & 0x00000040) != 0)) {
          output.writeInt64(7, timestamp_);
        }
        if (((bitField0_ & 0x00000080) != 0)) {
          output.writeInt32(8, satellites_);
        }
        if (((bitField0_ & 0x00000100) != 0)) {
          output.writeInt32(9, status_);
        }
        getUnknownFields().writeTo(output);
      }

      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (((bitField0_ & 0x00000001) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeDoubleSize(1, latitude_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeDoubleSize(2, longitude_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeDoubleSize(3, altitude_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeDoubleSize(4, precision_);
        }
        if (((bitField0_ & 0x00000010) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeDoubleSize(5, heading_);
        }
        if (((bitField0_ & 0x00000020) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeDoubleSize(6, speed_);
        }
        if (((bitField0_ & 0x00000040) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt64Size(7, timestamp_);
        }
        if (((bitField0_ & 0x00000080) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt32Size(8, satellites_);
        }
        if (((bitField0_ & 0x00000100) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeInt32Size(9, status_);
        }
        size += getUnknownFields().getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof KuraPayloadProto.KuraPayload.KuraPosition)) {
          return super.equals(obj);
        }
        KuraPayloadProto.KuraPayload.KuraPosition other = (KuraPayloadProto.KuraPayload.KuraPosition) obj;

        if (hasLatitude() != other.hasLatitude()) return false;
        if (hasLatitude()) {
          if (java.lang.Double.doubleToLongBits(getLatitude())
              != java.lang.Double.doubleToLongBits(
                  other.getLatitude())) return false;
        }
        if (hasLongitude() != other.hasLongitude()) return false;
        if (hasLongitude()) {
          if (java.lang.Double.doubleToLongBits(getLongitude())
              != java.lang.Double.doubleToLongBits(
                  other.getLongitude())) return false;
        }
        if (hasAltitude() != other.hasAltitude()) return false;
        if (hasAltitude()) {
          if (java.lang.Double.doubleToLongBits(getAltitude())
              != java.lang.Double.doubleToLongBits(
                  other.getAltitude())) return false;
        }
        if (hasPrecision() != other.hasPrecision()) return false;
        if (hasPrecision()) {
          if (java.lang.Double.doubleToLongBits(getPrecision())
              != java.lang.Double.doubleToLongBits(
                  other.getPrecision())) return false;
        }
        if (hasHeading() != other.hasHeading()) return false;
        if (hasHeading()) {
          if (java.lang.Double.doubleToLongBits(getHeading())
              != java.lang.Double.doubleToLongBits(
                  other.getHeading())) return false;
        }
        if (hasSpeed() != other.hasSpeed()) return false;
        if (hasSpeed()) {
          if (java.lang.Double.doubleToLongBits(getSpeed())
              != java.lang.Double.doubleToLongBits(
                  other.getSpeed())) return false;
        }
        if (hasTimestamp() != other.hasTimestamp()) return false;
        if (hasTimestamp()) {
          if (getTimestamp()
              != other.getTimestamp()) return false;
        }
        if (hasSatellites() != other.hasSatellites()) return false;
        if (hasSatellites()) {
          if (getSatellites()
              != other.getSatellites()) return false;
        }
        if (hasStatus() != other.hasStatus()) return false;
        if (hasStatus()) {
          if (getStatus()
              != other.getStatus()) return false;
        }
        if (!getUnknownFields().equals(other.getUnknownFields())) return false;
        return true;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasLatitude()) {
          hash = (37 * hash) + LATITUDE_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
              java.lang.Double.doubleToLongBits(getLatitude()));
        }
        if (hasLongitude()) {
          hash = (37 * hash) + LONGITUDE_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
              java.lang.Double.doubleToLongBits(getLongitude()));
        }
        if (hasAltitude()) {
          hash = (37 * hash) + ALTITUDE_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
              java.lang.Double.doubleToLongBits(getAltitude()));
        }
        if (hasPrecision()) {
          hash = (37 * hash) + PRECISION_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
              java.lang.Double.doubleToLongBits(getPrecision()));
        }
        if (hasHeading()) {
          hash = (37 * hash) + HEADING_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
              java.lang.Double.doubleToLongBits(getHeading()));
        }
        if (hasSpeed()) {
          hash = (37 * hash) + SPEED_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
              java.lang.Double.doubleToLongBits(getSpeed()));
        }
        if (hasTimestamp()) {
          hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
          hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
              getTimestamp());
        }
        if (hasSatellites()) {
          hash = (37 * hash) + SATELLITES_FIELD_NUMBER;
          hash = (53 * hash) + getSatellites();
        }
        if (hasStatus()) {
          hash = (37 * hash) + STATUS_FIELD_NUMBER;
          hash = (53 * hash) + getStatus();
        }
        hash = (29 * hash) + getUnknownFields().hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static KuraPayloadProto.KuraPayload.KuraPosition parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }

      @java.lang.Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(KuraPayloadProto.KuraPayload.KuraPosition prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }

      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code kuradatatypes.KuraPayload.KuraPosition}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload.KuraPosition)
          KuraPayloadProto.KuraPayload.KuraPositionOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  KuraPayloadProto.KuraPayload.KuraPosition.class, KuraPayloadProto.KuraPayload.KuraPosition.Builder.class);
        }

        // Construct using org.eclipse.kapua.client.gateway.kura.proto.KuraPayloadProto.KuraPayload.KuraPosition.newBuilder()
        private Builder() {

        }

        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);

        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          latitude_ = 0D;
          bitField0_ = (bitField0_ & ~0x00000001);
          longitude_ = 0D;
          bitField0_ = (bitField0_ & ~0x00000002);
          altitude_ = 0D;
          bitField0_ = (bitField0_ & ~0x00000004);
          precision_ = 0D;
          bitField0_ = (bitField0_ & ~0x00000008);
          heading_ = 0D;
          bitField0_ = (bitField0_ & ~0x00000010);
          speed_ = 0D;
          bitField0_ = (bitField0_ & ~0x00000020);
          timestamp_ = 0L;
          bitField0_ = (bitField0_ & ~0x00000040);
          satellites_ = 0;
          bitField0_ = (bitField0_ & ~0x00000080);
          status_ = 0;
          bitField0_ = (bitField0_ & ~0x00000100);
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
        }

        @java.lang.Override
        public KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstanceForType() {
          return KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance();
        }

        @java.lang.Override
        public KuraPayloadProto.KuraPayload.KuraPosition build() {
          KuraPayloadProto.KuraPayload.KuraPosition result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public KuraPayloadProto.KuraPayload.KuraPosition buildPartial() {
          KuraPayloadProto.KuraPayload.KuraPosition result = new KuraPayloadProto.KuraPayload.KuraPosition(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.latitude_ = latitude_;
            to_bitField0_ |= 0x00000001;
          }
          if (((from_bitField0_ & 0x00000002) != 0)) {
            result.longitude_ = longitude_;
            to_bitField0_ |= 0x00000002;
          }
          if (((from_bitField0_ & 0x00000004) != 0)) {
            result.altitude_ = altitude_;
            to_bitField0_ |= 0x00000004;
          }
          if (((from_bitField0_ & 0x00000008) != 0)) {
            result.precision_ = precision_;
            to_bitField0_ |= 0x00000008;
          }
          if (((from_bitField0_ & 0x00000010) != 0)) {
            result.heading_ = heading_;
            to_bitField0_ |= 0x00000010;
          }
          if (((from_bitField0_ & 0x00000020) != 0)) {
            result.speed_ = speed_;
            to_bitField0_ |= 0x00000020;
          }
          if (((from_bitField0_ & 0x00000040) != 0)) {
            result.timestamp_ = timestamp_;
            to_bitField0_ |= 0x00000040;
          }
          if (((from_bitField0_ & 0x00000080) != 0)) {
            result.satellites_ = satellites_;
            to_bitField0_ |= 0x00000080;
          }
          if (((from_bitField0_ & 0x00000100) != 0)) {
            result.status_ = status_;
            to_bitField0_ |= 0x00000100;
          }
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }

        @java.lang.Override
        public Builder clone() {
          return super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof KuraPayloadProto.KuraPayload.KuraPosition) {
            return mergeFrom((KuraPayloadProto.KuraPayload.KuraPosition)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(KuraPayloadProto.KuraPayload.KuraPosition other) {
          if (other == KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance()) return this;
          if (other.hasLatitude()) {
            setLatitude(other.getLatitude());
          }
          if (other.hasLongitude()) {
            setLongitude(other.getLongitude());
          }
          if (other.hasAltitude()) {
            setAltitude(other.getAltitude());
          }
          if (other.hasPrecision()) {
            setPrecision(other.getPrecision());
          }
          if (other.hasHeading()) {
            setHeading(other.getHeading());
          }
          if (other.hasSpeed()) {
            setSpeed(other.getSpeed());
          }
          if (other.hasTimestamp()) {
            setTimestamp(other.getTimestamp());
          }
          if (other.hasSatellites()) {
            setSatellites(other.getSatellites());
          }
          if (other.hasStatus()) {
            setStatus(other.getStatus());
          }
          this.mergeUnknownFields(other.getUnknownFields());
          onChanged();
          return this;
        }

        @java.lang.Override
        public final boolean isInitialized() {
          if (!hasLatitude()) {
            return false;
          }
          if (!hasLongitude()) {
            return false;
          }
          return true;
        }

        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          if (extensionRegistry == null) {
            throw new java.lang.NullPointerException();
          }
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                case 9: {
                  latitude_ = input.readDouble();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 9
                case 17: {
                  longitude_ = input.readDouble();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 17
                case 25: {
                  altitude_ = input.readDouble();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 25
                case 33: {
                  precision_ = input.readDouble();
                  bitField0_ |= 0x00000008;
                  break;
                } // case 33
                case 41: {
                  heading_ = input.readDouble();
                  bitField0_ |= 0x00000010;
                  break;
                } // case 41
                case 49: {
                  speed_ = input.readDouble();
                  bitField0_ |= 0x00000020;
                  break;
                } // case 49
                case 56: {
                  timestamp_ = input.readInt64();
                  bitField0_ |= 0x00000040;
                  break;
                } // case 56
                case 64: {
                  satellites_ = input.readInt32();
                  bitField0_ |= 0x00000080;
                  break;
                } // case 64
                case 72: {
                  status_ = input.readInt32();
                  bitField0_ |= 0x00000100;
                  break;
                } // case 72
                default: {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
              } // switch (tag)
            } // while (!done)
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.unwrapIOException();
          } finally {
            onChanged();
          } // finally
          return this;
        }
        private int bitField0_;

        private double latitude_ ;
        /**
         * <code>required double latitude = 1;</code>
         * @return Whether the latitude field is set.
         */
        @java.lang.Override
        public boolean hasLatitude() {
          return ((bitField0_ & 0x00000001) != 0);
        }
        /**
         * <code>required double latitude = 1;</code>
         * @return The latitude.
         */
        @java.lang.Override
        public double getLatitude() {
          return latitude_;
        }
        /**
         * <code>required double latitude = 1;</code>
         * @param value The latitude to set.
         * @return This builder for chaining.
         */
        public Builder setLatitude(double value) {
          bitField0_ |= 0x00000001;
          latitude_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>required double latitude = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearLatitude() {
          bitField0_ = (bitField0_ & ~0x00000001);
          latitude_ = 0D;
          onChanged();
          return this;
        }

        private double longitude_ ;
        /**
         * <code>required double longitude = 2;</code>
         * @return Whether the longitude field is set.
         */
        @java.lang.Override
        public boolean hasLongitude() {
          return ((bitField0_ & 0x00000002) != 0);
        }
        /**
         * <code>required double longitude = 2;</code>
         * @return The longitude.
         */
        @java.lang.Override
        public double getLongitude() {
          return longitude_;
        }
        /**
         * <code>required double longitude = 2;</code>
         * @param value The longitude to set.
         * @return This builder for chaining.
         */
        public Builder setLongitude(double value) {
          bitField0_ |= 0x00000002;
          longitude_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>required double longitude = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearLongitude() {
          bitField0_ = (bitField0_ & ~0x00000002);
          longitude_ = 0D;
          onChanged();
          return this;
        }

        private double altitude_ ;
        /**
         * <code>optional double altitude = 3;</code>
         * @return Whether the altitude field is set.
         */
        @java.lang.Override
        public boolean hasAltitude() {
          return ((bitField0_ & 0x00000004) != 0);
        }
        /**
         * <code>optional double altitude = 3;</code>
         * @return The altitude.
         */
        @java.lang.Override
        public double getAltitude() {
          return altitude_;
        }
        /**
         * <code>optional double altitude = 3;</code>
         * @param value The altitude to set.
         * @return This builder for chaining.
         */
        public Builder setAltitude(double value) {
          bitField0_ |= 0x00000004;
          altitude_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional double altitude = 3;</code>
         * @return This builder for chaining.
         */
        public Builder clearAltitude() {
          bitField0_ = (bitField0_ & ~0x00000004);
          altitude_ = 0D;
          onChanged();
          return this;
        }

        private double precision_ ;
        /**
         * <pre>
         * dilution of precision of the current satellite fix. 
         * </pre>
         *
         * <code>optional double precision = 4;</code>
         * @return Whether the precision field is set.
         */
        @java.lang.Override
        public boolean hasPrecision() {
          return ((bitField0_ & 0x00000008) != 0);
        }
        /**
         * <pre>
         * dilution of precision of the current satellite fix. 
         * </pre>
         *
         * <code>optional double precision = 4;</code>
         * @return The precision.
         */
        @java.lang.Override
        public double getPrecision() {
          return precision_;
        }
        /**
         * <pre>
         * dilution of precision of the current satellite fix. 
         * </pre>
         *
         * <code>optional double precision = 4;</code>
         * @param value The precision to set.
         * @return This builder for chaining.
         */
        public Builder setPrecision(double value) {
          bitField0_ |= 0x00000008;
          precision_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * dilution of precision of the current satellite fix. 
         * </pre>
         *
         * <code>optional double precision = 4;</code>
         * @return This builder for chaining.
         */
        public Builder clearPrecision() {
          bitField0_ = (bitField0_ & ~0x00000008);
          precision_ = 0D;
          onChanged();
          return this;
        }

        private double heading_ ;
        /**
         * <pre>
         * heading in degrees
         * </pre>
         *
         * <code>optional double heading = 5;</code>
         * @return Whether the heading field is set.
         */
        @java.lang.Override
        public boolean hasHeading() {
          return ((bitField0_ & 0x00000010) != 0);
        }
        /**
         * <pre>
         * heading in degrees
         * </pre>
         *
         * <code>optional double heading = 5;</code>
         * @return The heading.
         */
        @java.lang.Override
        public double getHeading() {
          return heading_;
        }
        /**
         * <pre>
         * heading in degrees
         * </pre>
         *
         * <code>optional double heading = 5;</code>
         * @param value The heading to set.
         * @return This builder for chaining.
         */
        public Builder setHeading(double value) {
          bitField0_ |= 0x00000010;
          heading_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * heading in degrees
         * </pre>
         *
         * <code>optional double heading = 5;</code>
         * @return This builder for chaining.
         */
        public Builder clearHeading() {
          bitField0_ = (bitField0_ & ~0x00000010);
          heading_ = 0D;
          onChanged();
          return this;
        }

        private double speed_ ;
        /**
         * <pre>
         * meters per second
         * </pre>
         *
         * <code>optional double speed = 6;</code>
         * @return Whether the speed field is set.
         */
        @java.lang.Override
        public boolean hasSpeed() {
          return ((bitField0_ & 0x00000020) != 0);
        }
        /**
         * <pre>
         * meters per second
         * </pre>
         *
         * <code>optional double speed = 6;</code>
         * @return The speed.
         */
        @java.lang.Override
        public double getSpeed() {
          return speed_;
        }
        /**
         * <pre>
         * meters per second
         * </pre>
         *
         * <code>optional double speed = 6;</code>
         * @param value The speed to set.
         * @return This builder for chaining.
         */
        public Builder setSpeed(double value) {
          bitField0_ |= 0x00000020;
          speed_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * meters per second
         * </pre>
         *
         * <code>optional double speed = 6;</code>
         * @return This builder for chaining.
         */
        public Builder clearSpeed() {
          bitField0_ = (bitField0_ & ~0x00000020);
          speed_ = 0D;
          onChanged();
          return this;
        }

        private long timestamp_ ;
        /**
         * <code>optional int64 timestamp = 7;</code>
         * @return Whether the timestamp field is set.
         */
        @java.lang.Override
        public boolean hasTimestamp() {
          return ((bitField0_ & 0x00000040) != 0);
        }
        /**
         * <code>optional int64 timestamp = 7;</code>
         * @return The timestamp.
         */
        @java.lang.Override
        public long getTimestamp() {
          return timestamp_;
        }
        /**
         * <code>optional int64 timestamp = 7;</code>
         * @param value The timestamp to set.
         * @return This builder for chaining.
         */
        public Builder setTimestamp(long value) {
          bitField0_ |= 0x00000040;
          timestamp_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional int64 timestamp = 7;</code>
         * @return This builder for chaining.
         */
        public Builder clearTimestamp() {
          bitField0_ = (bitField0_ & ~0x00000040);
          timestamp_ = 0L;
          onChanged();
          return this;
        }

        private int satellites_ ;
        /**
         * <pre>
         * number satellites locked by the GPS device
         * </pre>
         *
         * <code>optional int32 satellites = 8;</code>
         * @return Whether the satellites field is set.
         */
        @java.lang.Override
        public boolean hasSatellites() {
          return ((bitField0_ & 0x00000080) != 0);
        }
        /**
         * <pre>
         * number satellites locked by the GPS device
         * </pre>
         *
         * <code>optional int32 satellites = 8;</code>
         * @return The satellites.
         */
        @java.lang.Override
        public int getSatellites() {
          return satellites_;
        }
        /**
         * <pre>
         * number satellites locked by the GPS device
         * </pre>
         *
         * <code>optional int32 satellites = 8;</code>
         * @param value The satellites to set.
         * @return This builder for chaining.
         */
        public Builder setSatellites(int value) {
          bitField0_ |= 0x00000080;
          satellites_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * number satellites locked by the GPS device
         * </pre>
         *
         * <code>optional int32 satellites = 8;</code>
         * @return This builder for chaining.
         */
        public Builder clearSatellites() {
          bitField0_ = (bitField0_ & ~0x00000080);
          satellites_ = 0;
          onChanged();
          return this;
        }

        private int status_ ;
        /**
         * <pre>
         * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
         * </pre>
         *
         * <code>optional int32 status = 9;</code>
         * @return Whether the status field is set.
         */
        @java.lang.Override
        public boolean hasStatus() {
          return ((bitField0_ & 0x00000100) != 0);
        }
        /**
         * <pre>
         * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
         * </pre>
         *
         * <code>optional int32 status = 9;</code>
         * @return The status.
         */
        @java.lang.Override
        public int getStatus() {
          return status_;
        }
        /**
         * <pre>
         * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
         * </pre>
         *
         * <code>optional int32 status = 9;</code>
         * @param value The status to set.
         * @return This builder for chaining.
         */
        public Builder setStatus(int value) {
          bitField0_ |= 0x00000100;
          status_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
         * </pre>
         *
         * <code>optional int32 status = 9;</code>
         * @return This builder for chaining.
         */
        public Builder clearStatus() {
          bitField0_ = (bitField0_ & ~0x00000100);
          status_ = 0;
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }

        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }


        // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload.KuraPosition)
      }

      // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload.KuraPosition)
      private static final KuraPayloadProto.KuraPayload.KuraPosition DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new KuraPayloadProto.KuraPayload.KuraPosition();
      }

      public static KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      @java.lang.Deprecated public static final com.google.protobuf.Parser<KuraPosition>
          PARSER = new com.google.protobuf.AbstractParser<KuraPosition>() {
        @java.lang.Override
        public KuraPosition parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

      public static com.google.protobuf.Parser<KuraPosition> parser() {
        return PARSER;
      }

      @java.lang.Override
      public com.google.protobuf.Parser<KuraPosition> getParserForType() {
        return PARSER;
      }

      @java.lang.Override
      public KuraPayloadProto.KuraPayload.KuraPosition getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }

    }

    private int bitField0_;
    public static final int TIMESTAMP_FIELD_NUMBER = 1;
    private long timestamp_;
    /**
     * <code>optional int64 timestamp = 1;</code>
     * @return Whether the timestamp field is set.
     */
    @java.lang.Override
    public boolean hasTimestamp() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <code>optional int64 timestamp = 1;</code>
     * @return The timestamp.
     */
    @java.lang.Override
    public long getTimestamp() {
      return timestamp_;
    }

    public static final int POSITION_FIELD_NUMBER = 2;
    private KuraPayloadProto.KuraPayload.KuraPosition position_;
    /**
     * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
     * @return Whether the position field is set.
     */
    @java.lang.Override
    public boolean hasPosition() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
     * @return The position.
     */
    @java.lang.Override
    public KuraPayloadProto.KuraPayload.KuraPosition getPosition() {
      return position_ == null ? KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
    }
    /**
     * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
     */
    @java.lang.Override
    public KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder() {
      return position_ == null ? KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
    }

    public static final int METRIC_FIELD_NUMBER = 5000;
    private java.util.List<KuraPayloadProto.KuraPayload.KuraMetric> metric_;
    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    @java.lang.Override
    public java.util.List<KuraPayloadProto.KuraPayload.KuraMetric> getMetricList() {
      return metric_;
    }
    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    @java.lang.Override
    public java.util.List<? extends KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
        getMetricOrBuilderList() {
      return metric_;
    }
    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    @java.lang.Override
    public int getMetricCount() {
      return metric_.size();
    }
    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    @java.lang.Override
    public KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index) {
      return metric_.get(index);
    }
    /**
     * <pre>
     * can be zero, so optional
     * </pre>
     *
     * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
     */
    @java.lang.Override
    public KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
        int index) {
      return metric_.get(index);
    }

    public static final int BODY_FIELD_NUMBER = 5001;
    private com.google.protobuf.ByteString body_;
    /**
     * <code>optional bytes body = 5001;</code>
     * @return Whether the body field is set.
     */
    @java.lang.Override
    public boolean hasBody() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <code>optional bytes body = 5001;</code>
     * @return The body.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getBody() {
      return body_;
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (hasPosition()) {
        if (!getPosition().isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      for (int i = 0; i < getMetricCount(); i++) {
        if (!getMetric(i).isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      if (!extensionsAreInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      com.google.protobuf.GeneratedMessageV3
        .ExtendableMessage<KuraPayloadProto.KuraPayload>.ExtensionWriter
          extensionWriter = newExtensionWriter();
      if (((bitField0_ & 0x00000001) != 0)) {
        output.writeInt64(1, timestamp_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeMessage(2, getPosition());
      }
      extensionWriter.writeUntil(5000, output);
      for (int i = 0; i < metric_.size(); i++) {
        output.writeMessage(5000, metric_.get(i));
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        output.writeBytes(5001, body_);
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(1, timestamp_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getPosition());
      }
      for (int i = 0; i < metric_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5000, metric_.get(i));
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(5001, body_);
      }
      size += extensionsSerializedSize();
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof KuraPayloadProto.KuraPayload)) {
        return super.equals(obj);
      }
      KuraPayloadProto.KuraPayload other = (KuraPayloadProto.KuraPayload) obj;

      if (hasTimestamp() != other.hasTimestamp()) return false;
      if (hasTimestamp()) {
        if (getTimestamp()
            != other.getTimestamp()) return false;
      }
      if (hasPosition() != other.hasPosition()) return false;
      if (hasPosition()) {
        if (!getPosition()
            .equals(other.getPosition())) return false;
      }
      if (!getMetricList()
          .equals(other.getMetricList())) return false;
      if (hasBody() != other.hasBody()) return false;
      if (hasBody()) {
        if (!getBody()
            .equals(other.getBody())) return false;
      }
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      if (!getExtensionFields().equals(other.getExtensionFields()))
        return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasTimestamp()) {
        hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getTimestamp());
      }
      if (hasPosition()) {
        hash = (37 * hash) + POSITION_FIELD_NUMBER;
        hash = (53 * hash) + getPosition().hashCode();
      }
      if (getMetricCount() > 0) {
        hash = (37 * hash) + METRIC_FIELD_NUMBER;
        hash = (53 * hash) + getMetricList().hashCode();
      }
      if (hasBody()) {
        hash = (37 * hash) + BODY_FIELD_NUMBER;
        hash = (53 * hash) + getBody().hashCode();
      }
      hash = hashFields(hash, getExtensionFields());
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static KuraPayloadProto.KuraPayload parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static KuraPayloadProto.KuraPayload parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static KuraPayloadProto.KuraPayload parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static KuraPayloadProto.KuraPayload parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static KuraPayloadProto.KuraPayload parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static KuraPayloadProto.KuraPayload parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static KuraPayloadProto.KuraPayload parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static KuraPayloadProto.KuraPayload parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static KuraPayloadProto.KuraPayload parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static KuraPayloadProto.KuraPayload parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static KuraPayloadProto.KuraPayload parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static KuraPayloadProto.KuraPayload parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(KuraPayloadProto.KuraPayload prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code kuradatatypes.KuraPayload}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<
          KuraPayloadProto.KuraPayload, Builder> implements
        // @@protoc_insertion_point(builder_implements:kuradatatypes.KuraPayload)
        KuraPayloadProto.KuraPayloadOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                KuraPayloadProto.KuraPayload.class, KuraPayloadProto.KuraPayload.Builder.class);
      }

      // Construct using org.eclipse.kapua.client.gateway.kura.proto.KuraPayloadProto.KuraPayload.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getPositionFieldBuilder();
          getMetricFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        timestamp_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000001);
        if (positionBuilder_ == null) {
          position_ = null;
        } else {
          positionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        if (metricBuilder_ == null) {
          metric_ = java.util.Collections.emptyList();
        } else {
          metric_ = null;
          metricBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        body_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000008);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return KuraPayloadProto.internal_static_kuradatatypes_KuraPayload_descriptor;
      }

      @java.lang.Override
      public KuraPayloadProto.KuraPayload getDefaultInstanceForType() {
        return KuraPayloadProto.KuraPayload.getDefaultInstance();
      }

      @java.lang.Override
      public KuraPayloadProto.KuraPayload build() {
        KuraPayloadProto.KuraPayload result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public KuraPayloadProto.KuraPayload buildPartial() {
        KuraPayloadProto.KuraPayload result = new KuraPayloadProto.KuraPayload(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.timestamp_ = timestamp_;
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          if (positionBuilder_ == null) {
            result.position_ = position_;
          } else {
            result.position_ = positionBuilder_.build();
          }
          to_bitField0_ |= 0x00000002;
        }
        if (metricBuilder_ == null) {
          if (((bitField0_ & 0x00000004) != 0)) {
            metric_ = java.util.Collections.unmodifiableList(metric_);
            bitField0_ = (bitField0_ & ~0x00000004);
          }
          result.metric_ = metric_;
        } else {
          result.metric_ = metricBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          to_bitField0_ |= 0x00000004;
        }
        result.body_ = body_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public <Type> Builder setExtension(
          com.google.protobuf.GeneratedMessage.GeneratedExtension<
              KuraPayloadProto.KuraPayload, Type> extension,
          Type value) {
        return super.setExtension(extension, value);
      }
      @java.lang.Override
      public <Type> Builder setExtension(
          com.google.protobuf.GeneratedMessage.GeneratedExtension<
              KuraPayloadProto.KuraPayload, java.util.List<Type>> extension,
          int index, Type value) {
        return super.setExtension(extension, index, value);
      }
      @java.lang.Override
      public <Type> Builder addExtension(
          com.google.protobuf.GeneratedMessage.GeneratedExtension<
              KuraPayloadProto.KuraPayload, java.util.List<Type>> extension,
          Type value) {
        return super.addExtension(extension, value);
      }
      @java.lang.Override
      public <Type> Builder clearExtension(
          com.google.protobuf.GeneratedMessage.GeneratedExtension<
              KuraPayloadProto.KuraPayload, Type> extension) {
        return super.clearExtension(extension);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof KuraPayloadProto.KuraPayload) {
          return mergeFrom((KuraPayloadProto.KuraPayload)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(KuraPayloadProto.KuraPayload other) {
        if (other == KuraPayloadProto.KuraPayload.getDefaultInstance()) return this;
        if (other.hasTimestamp()) {
          setTimestamp(other.getTimestamp());
        }
        if (other.hasPosition()) {
          mergePosition(other.getPosition());
        }
        if (metricBuilder_ == null) {
          if (!other.metric_.isEmpty()) {
            if (metric_.isEmpty()) {
              metric_ = other.metric_;
              bitField0_ = (bitField0_ & ~0x00000004);
            } else {
              ensureMetricIsMutable();
              metric_.addAll(other.metric_);
            }
            onChanged();
          }
        } else {
          if (!other.metric_.isEmpty()) {
            if (metricBuilder_.isEmpty()) {
              metricBuilder_.dispose();
              metricBuilder_ = null;
              metric_ = other.metric_;
              bitField0_ = (bitField0_ & ~0x00000004);
              metricBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getMetricFieldBuilder() : null;
            } else {
              metricBuilder_.addAllMessages(other.metric_);
            }
          }
        }
        if (other.hasBody()) {
          setBody(other.getBody());
        }
        this.mergeExtensionFields(other);
        this.mergeUnknownFields(other.getUnknownFields());
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        if (hasPosition()) {
          if (!getPosition().isInitialized()) {
            return false;
          }
        }
        for (int i = 0; i < getMetricCount(); i++) {
          if (!getMetric(i).isInitialized()) {
            return false;
          }
        }
        if (!extensionsAreInitialized()) {
          return false;
        }
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8: {
                timestamp_ = input.readInt64();
                bitField0_ |= 0x00000001;
                break;
              } // case 8
              case 18: {
                input.readMessage(
                    getPositionFieldBuilder().getBuilder(),
                    extensionRegistry);
                bitField0_ |= 0x00000002;
                break;
              } // case 18
              case 40002: {
                KuraPayloadProto.KuraPayload.KuraMetric m =
                    input.readMessage(
                        KuraPayloadProto.KuraPayload.KuraMetric.PARSER,
                        extensionRegistry);
                if (metricBuilder_ == null) {
                  ensureMetricIsMutable();
                  metric_.add(m);
                } else {
                  metricBuilder_.addMessage(m);
                }
                break;
              } // case 40002
              case 40010: {
                body_ = input.readBytes();
                bitField0_ |= 0x00000008;
                break;
              } // case 40010
              default: {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }
      private int bitField0_;

      private long timestamp_ ;
      /**
       * <code>optional int64 timestamp = 1;</code>
       * @return Whether the timestamp field is set.
       */
      @java.lang.Override
      public boolean hasTimestamp() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>optional int64 timestamp = 1;</code>
       * @return The timestamp.
       */
      @java.lang.Override
      public long getTimestamp() {
        return timestamp_;
      }
      /**
       * <code>optional int64 timestamp = 1;</code>
       * @param value The timestamp to set.
       * @return This builder for chaining.
       */
      public Builder setTimestamp(long value) {
        bitField0_ |= 0x00000001;
        timestamp_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional int64 timestamp = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearTimestamp() {
        bitField0_ = (bitField0_ & ~0x00000001);
        timestamp_ = 0L;
        onChanged();
        return this;
      }

      private KuraPayloadProto.KuraPayload.KuraPosition position_;
      private com.google.protobuf.SingleFieldBuilderV3<
          KuraPayloadProto.KuraPayload.KuraPosition, KuraPayloadProto.KuraPayload.KuraPosition.Builder, KuraPayloadProto.KuraPayload.KuraPositionOrBuilder> positionBuilder_;
      /**
       * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
       * @return Whether the position field is set.
       */
      public boolean hasPosition() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
       * @return The position.
       */
      public KuraPayloadProto.KuraPayload.KuraPosition getPosition() {
        if (positionBuilder_ == null) {
          return position_ == null ? KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
        } else {
          return positionBuilder_.getMessage();
        }
      }
      /**
       * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
       */
      public Builder setPosition(KuraPayloadProto.KuraPayload.KuraPosition value) {
        if (positionBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          position_ = value;
          onChanged();
        } else {
          positionBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
       */
      public Builder setPosition(
          KuraPayloadProto.KuraPayload.KuraPosition.Builder builderForValue) {
        if (positionBuilder_ == null) {
          position_ = builderForValue.build();
          onChanged();
        } else {
          positionBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
       */
      public Builder mergePosition(KuraPayloadProto.KuraPayload.KuraPosition value) {
        if (positionBuilder_ == null) {
          if (((bitField0_ & 0x00000002) != 0) &&
              position_ != null &&
              position_ != KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance()) {
            position_ =
              KuraPayloadProto.KuraPayload.KuraPosition.newBuilder(position_).mergeFrom(value).buildPartial();
          } else {
            position_ = value;
          }
          onChanged();
        } else {
          positionBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
       */
      public Builder clearPosition() {
        if (positionBuilder_ == null) {
          position_ = null;
          onChanged();
        } else {
          positionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      /**
       * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
       */
      public KuraPayloadProto.KuraPayload.KuraPosition.Builder getPositionBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getPositionFieldBuilder().getBuilder();
      }
      /**
       * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
       */
      public KuraPayloadProto.KuraPayload.KuraPositionOrBuilder getPositionOrBuilder() {
        if (positionBuilder_ != null) {
          return positionBuilder_.getMessageOrBuilder();
        } else {
          return position_ == null ?
              KuraPayloadProto.KuraPayload.KuraPosition.getDefaultInstance() : position_;
        }
      }
      /**
       * <code>optional .kuradatatypes.KuraPayload.KuraPosition position = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          KuraPayloadProto.KuraPayload.KuraPosition, KuraPayloadProto.KuraPayload.KuraPosition.Builder, KuraPayloadProto.KuraPayload.KuraPositionOrBuilder>
          getPositionFieldBuilder() {
        if (positionBuilder_ == null) {
          positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              KuraPayloadProto.KuraPayload.KuraPosition, KuraPayloadProto.KuraPayload.KuraPosition.Builder, KuraPayloadProto.KuraPayload.KuraPositionOrBuilder>(
                  getPosition(),
                  getParentForChildren(),
                  isClean());
          position_ = null;
        }
        return positionBuilder_;
      }

      private java.util.List<KuraPayloadProto.KuraPayload.KuraMetric> metric_ =
        java.util.Collections.emptyList();
      private void ensureMetricIsMutable() {
        if (!((bitField0_ & 0x00000004) != 0)) {
          metric_ = new java.util.ArrayList<KuraPayloadProto.KuraPayload.KuraMetric>(metric_);
          bitField0_ |= 0x00000004;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          KuraPayloadProto.KuraPayload.KuraMetric, KuraPayloadProto.KuraPayload.KuraMetric.Builder, KuraPayloadProto.KuraPayload.KuraMetricOrBuilder> metricBuilder_;

      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public java.util.List<KuraPayloadProto.KuraPayload.KuraMetric> getMetricList() {
        if (metricBuilder_ == null) {
          return java.util.Collections.unmodifiableList(metric_);
        } else {
          return metricBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public int getMetricCount() {
        if (metricBuilder_ == null) {
          return metric_.size();
        } else {
          return metricBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public KuraPayloadProto.KuraPayload.KuraMetric getMetric(int index) {
        if (metricBuilder_ == null) {
          return metric_.get(index);
        } else {
          return metricBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public Builder setMetric(
          int index, KuraPayloadProto.KuraPayload.KuraMetric value) {
        if (metricBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMetricIsMutable();
          metric_.set(index, value);
          onChanged();
        } else {
          metricBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public Builder setMetric(
          int index, KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
        if (metricBuilder_ == null) {
          ensureMetricIsMutable();
          metric_.set(index, builderForValue.build());
          onChanged();
        } else {
          metricBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public Builder addMetric(KuraPayloadProto.KuraPayload.KuraMetric value) {
        if (metricBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMetricIsMutable();
          metric_.add(value);
          onChanged();
        } else {
          metricBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public Builder addMetric(
          int index, KuraPayloadProto.KuraPayload.KuraMetric value) {
        if (metricBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMetricIsMutable();
          metric_.add(index, value);
          onChanged();
        } else {
          metricBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public Builder addMetric(
          KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
        if (metricBuilder_ == null) {
          ensureMetricIsMutable();
          metric_.add(builderForValue.build());
          onChanged();
        } else {
          metricBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public Builder addMetric(
          int index, KuraPayloadProto.KuraPayload.KuraMetric.Builder builderForValue) {
        if (metricBuilder_ == null) {
          ensureMetricIsMutable();
          metric_.add(index, builderForValue.build());
          onChanged();
        } else {
          metricBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public Builder addAllMetric(
          java.lang.Iterable<? extends KuraPayloadProto.KuraPayload.KuraMetric> values) {
        if (metricBuilder_ == null) {
          ensureMetricIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, metric_);
          onChanged();
        } else {
          metricBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public Builder clearMetric() {
        if (metricBuilder_ == null) {
          metric_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000004);
          onChanged();
        } else {
          metricBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public Builder removeMetric(int index) {
        if (metricBuilder_ == null) {
          ensureMetricIsMutable();
          metric_.remove(index);
          onChanged();
        } else {
          metricBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public KuraPayloadProto.KuraPayload.KuraMetric.Builder getMetricBuilder(
          int index) {
        return getMetricFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public KuraPayloadProto.KuraPayload.KuraMetricOrBuilder getMetricOrBuilder(
          int index) {
        if (metricBuilder_ == null) {
          return metric_.get(index);  } else {
          return metricBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public java.util.List<? extends KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
           getMetricOrBuilderList() {
        if (metricBuilder_ != null) {
          return metricBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(metric_);
        }
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public KuraPayloadProto.KuraPayload.KuraMetric.Builder addMetricBuilder() {
        return getMetricFieldBuilder().addBuilder(
            KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance());
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public KuraPayloadProto.KuraPayload.KuraMetric.Builder addMetricBuilder(
          int index) {
        return getMetricFieldBuilder().addBuilder(
            index, KuraPayloadProto.KuraPayload.KuraMetric.getDefaultInstance());
      }
      /**
       * <pre>
       * can be zero, so optional
       * </pre>
       *
       * <code>repeated .kuradatatypes.KuraPayload.KuraMetric metric = 5000;</code>
       */
      public java.util.List<KuraPayloadProto.KuraPayload.KuraMetric.Builder>
           getMetricBuilderList() {
        return getMetricFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          KuraPayloadProto.KuraPayload.KuraMetric, KuraPayloadProto.KuraPayload.KuraMetric.Builder, KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>
          getMetricFieldBuilder() {
        if (metricBuilder_ == null) {
          metricBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              KuraPayloadProto.KuraPayload.KuraMetric, KuraPayloadProto.KuraPayload.KuraMetric.Builder, KuraPayloadProto.KuraPayload.KuraMetricOrBuilder>(
                  metric_,
                  ((bitField0_ & 0x00000004) != 0),
                  getParentForChildren(),
                  isClean());
          metric_ = null;
        }
        return metricBuilder_;
      }

      private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <code>optional bytes body = 5001;</code>
       * @return Whether the body field is set.
       */
      @java.lang.Override
      public boolean hasBody() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <code>optional bytes body = 5001;</code>
       * @return The body.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getBody() {
        return body_;
      }
      /**
       * <code>optional bytes body = 5001;</code>
       * @param value The body to set.
       * @return This builder for chaining.
       */
      public Builder setBody(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000008;
        body_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional bytes body = 5001;</code>
       * @return This builder for chaining.
       */
      public Builder clearBody() {
        bitField0_ = (bitField0_ & ~0x00000008);
        body_ = getDefaultInstance().getBody();
        onChanged();
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:kuradatatypes.KuraPayload)
    }

    // @@protoc_insertion_point(class_scope:kuradatatypes.KuraPayload)
    private static final KuraPayloadProto.KuraPayload DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new KuraPayloadProto.KuraPayload();
    }

    public static KuraPayloadProto.KuraPayload getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<KuraPayload>
        PARSER = new com.google.protobuf.AbstractParser<KuraPayload>() {
      @java.lang.Override
      public KuraPayload parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        Builder builder = newBuilder();
        try {
          builder.mergeFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(builder.buildPartial());
        } catch (com.google.protobuf.UninitializedMessageException e) {
          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(builder.buildPartial());
        }
        return builder.buildPartial();
      }
    };

    public static com.google.protobuf.Parser<KuraPayload> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<KuraPayload> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public KuraPayloadProto.KuraPayload getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_kuradatatypes_KuraPayload_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_kuradatatypes_KuraPayload_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\021kurapayload.proto\022\rkuradatatypes\"\243\005\n\013K" +
      "uraPayload\022\021\n\ttimestamp\030\001 \001(\003\0229\n\010positio" +
      "n\030\002 \001(\0132\'.kuradatatypes.KuraPayload.Kura" +
      "Position\0226\n\006metric\030\210\' \003(\0132%.kuradatatype" +
      "s.KuraPayload.KuraMetric\022\r\n\004body\030\211\' \001(\014\032" +
      "\305\002\n\nKuraMetric\022\014\n\004name\030\001 \002(\t\022=\n\004type\030\002 \002" +
      "(\0162/.kuradatatypes.KuraPayload.KuraMetri" +
      "c.ValueType\022\024\n\014double_value\030\003 \001(\001\022\023\n\013flo" +
      "at_value\030\004 \001(\002\022\022\n\nlong_value\030\005 \001(\003\022\021\n\tin" +
      "t_value\030\006 \001(\005\022\022\n\nbool_value\030\007 \001(\010\022\024\n\014str" +
      "ing_value\030\010 \001(\t\022\023\n\013bytes_value\030\t \001(\014\"Y\n\t" +
      "ValueType\022\n\n\006DOUBLE\020\000\022\t\n\005FLOAT\020\001\022\t\n\005INT6" +
      "4\020\002\022\t\n\005INT32\020\003\022\010\n\004BOOL\020\004\022\n\n\006STRING\020\005\022\t\n\005" +
      "BYTES\020\006\032\257\001\n\014KuraPosition\022\020\n\010latitude\030\001 \002" +
      "(\001\022\021\n\tlongitude\030\002 \002(\001\022\020\n\010altitude\030\003 \001(\001\022" +
      "\021\n\tprecision\030\004 \001(\001\022\017\n\007heading\030\005 \001(\001\022\r\n\005s" +
      "peed\030\006 \001(\001\022\021\n\ttimestamp\030\007 \001(\003\022\022\n\nsatelli" +
      "tes\030\010 \001(\005\022\016\n\006status\030\t \001(\005*\005\010\003\020\210\'BA\n-org." +
      "eclipse.kapua.gateway.client.kura.payloa" +
      "dB\020KuraPayloadProto"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        });
    internal_static_kuradatatypes_KuraPayload_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_kuradatatypes_KuraPayload_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_kuradatatypes_KuraPayload_descriptor,
        new java.lang.String[] { "Timestamp", "Position", "Metric", "Body", });
    internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor =
      internal_static_kuradatatypes_KuraPayload_descriptor.getNestedTypes().get(0);
    internal_static_kuradatatypes_KuraPayload_KuraMetric_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_kuradatatypes_KuraPayload_KuraMetric_descriptor,
        new java.lang.String[] { "Name", "Type", "DoubleValue", "FloatValue", "LongValue", "IntValue", "BoolValue", "StringValue", "BytesValue", });
    internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor =
      internal_static_kuradatatypes_KuraPayload_descriptor.getNestedTypes().get(1);
    internal_static_kuradatatypes_KuraPayload_KuraPosition_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_kuradatatypes_KuraPayload_KuraPosition_descriptor,
        new java.lang.String[] { "Latitude", "Longitude", "Altitude", "Precision", "Heading", "Speed", "Timestamp", "Satellites", "Status", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
